home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / a_to_d / delftips / ti2863.asc < prev   
Text File  |  1996-09-15  |  1KB  |  61 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.   PRODUCT  :  Delphi                                 NUMBER  :  2863
  8.   VERSION  :  All
  9.        OS  :  Windows
  10.      DATE  :  August 23, 1995                          PAGE  :  1/1
  11.  
  12.     TITLE  :  How to use a custom cursor.
  13.  
  14.  
  15.  
  16.  
  17. Q:  How do I use one of the cursor files in the c:\delphi\images\cursors?
  18.  
  19. A:  Use the image editor to load the cursor into a RES file.
  20.     The following example assumes that you saved the cursor in the RES file
  21.     as "cursor_1", and you save the RES file as MYFILE.RES.
  22.     
  23. (*** BEGIN CODE ***)
  24. {$R c:\programs\delphi\MyFile.res}   { This is your RES file }
  25.  
  26. const PutTheCursorHere_Dude = 1;     { arbitrary positive number }
  27.  
  28. procedure stuff;
  29. begin
  30.   screen.cursors[PutTheCursorHere_Dude] := LoadCursor(hInstance, 
  31.                                                       PChar('cursor_1'));
  32.   screen.cursor := PutTheCursorHere_Dude;
  33. end;
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. DISCLAIMER: You have the right to use this technical information
  58. subject to the terms of the No-Nonsense License Statement that
  59. you received with the Borland product to which this information
  60. pertains.
  61.